<template>
	<view class="g_video" @click="toUrl()" v-if="pic">
		<image :src="pic"></image>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				time: '',
				url: '',
				pic: ''
			}
		},
		created() {
			this.getTime();
			this.getInfo();
		},
		methods: {
			toUrl(){
				uni.navigateTo({
					url: '/pages/groupbuy/video?url='+this.url+'?t='+this.time
				})
			},
			getInfo(){
				this.$axios('group/getVoide','POST','pintuan').then(res=>{
					if(res.data.code == 200){
						this.url = res.data.data.url;
						this.pic = res.data.data.pic;
					}
				})
			},
			getTime(){
				this.time = new Date().getTime();
			}
		}
	}
</script>

<style lang="scss">
.g_video{
	position: fixed;
	z-index: 10;
	width: 120rpx;
	height: 120rpx;
	right: 6rpx;
	top: 230rpx;
	border-radius: 50%;
	box-shadow: 4rpx 5rpx 17rpx 10rpx rgba(150,150,150,.5);
	image{
		width: 100%;
		height: 100%;
	}
}
</style>